package exo4;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;

public class BiblioJmain {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {
		/*
		 * Abonnee moussa,didi,cedric,claire; moussa=new
		 * Abonnee("KANOUTE","6 residence pablo piccasso","NULL","NULL");
		 */
       
		BufferedReader in = new BufferedReader(new FileReader(
				"abonnee.csv"));
		String line;
		String line2;
	
		
		
		while ((line = in.readLine()) != null) {
			StringTokenizer tok = new StringTokenizer(line, ",");// ";" est le
																	// separateur
			int nt = tok.countTokens(); // nombre d'unitees lexicales
			for (int i = 0; i < nt; i++) {
				System.out.println("Prochain abonné : "+ tok.nextToken());

			}

			// TODO Auto-generated method stub

		}
		in.close();
		//System.out.println("Prochain prix : ");
		
		BufferedReader in1 = new BufferedReader(new FileReader(
				"ouvrage.csv"));
		while ((line2 = in1.readLine()) != null) {
			StringTokenizer tok = new StringTokenizer(line2, ",");// ";" est le
																	// separateur
			int nt = tok.countTokens(); // nombre d'unitees lexicales
			for (int i = 0; i < nt; i++) {
				System.out.println("Prochain ouvrage : "+ tok.nextToken());
				
			}
			in1.close();

				
		
	}
		/*@Override
		public boolean equalsequals(objet o){
		}*/
		
}
}